package cn.edu.scau.cmi.liyunlin.Singleton;

public class Chairman {
	
	private static Chairman instance;// 静态成员变量，用来保存唯一创建的对象实例
	private String name;
	private Chairman( String name ) {// 私有化构造方法，防止外部创建对象
		this.name = name;
	}
	public static Chairman getInstance( String name ) {// 检查并确保只有一个实例
		if( instance == null && !name.equals( null ) ) {
			instance = new Chairman( name );
		}
		return instance;
	}
	
	public String getName() {
		return this.name;
	}

}
